<template>
	<view class="boxes">
		<img class="img" :src="baseUrlImg+imgcode" model=""></img>
		<button type="default">请长按图片保存</button>
	</view>
</template>

<script>
	import {
		qrcode
	} from '../../request/api.js'
	export default {
		data() {
			return {
				baseUrlImg: '',
				imgcode: '',
			}
		},
		onLoad() {
			this.baseUrlImg = getApp().globalData.baseUrlImg;
			this.qrcode();
		},
		methods: {
			qrcode() {
				let param = {
					cid: uni.getStorageSync('companyId')
				}
				qrcode(param).then(res => {
					console.log(res)
					if (res.code === 200) {
						this.imgcode = res.data.qrcode
						console.log(this.imgcode)
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.boxes{
		.img {
			width: 600upx;
			margin: 50upx auto;
			display: block;
			background-color: #FFFFFF;
		}
		
		button {
			width: 630upx;
			height: 88upx;
			line-height: 88upx;
			background: #F86C53;
			border-radius: 44upx;
			color: #FFFFFF;
			font-size: 36upx;
			font-family: Source Han Sans CN;
			font-weight: 500;
		}
		
		button:after {
			border: none;
		}
	}
</style>
